// pages/components/tabbar/tabbar.js
var util = require('../../../utils/util.js');
var api = require('../../../config/api.js');
const app = getApp()
Component({
  properties: {
    list: {
      type: String,
      value: '',
      observer: function (newData, oldData) {
        this.getNext30Days()
        // this.getLocation()
      }
    }
  },
  data: {
  },
  methods: {
    handleAgreePrivacyAuthorization() {
      this.triggerEvent('getLocation')
    },
    handleOpenPrivacyContract() {
      // 打开隐私协议页面
      wx.openPrivacyContract({
        success: () => {}, // 打开成功
        fail: () => {}, // 打开失败
        complete: () => {}
      })
    },
    platformRules () {
      wx.navigateTo({
        url: '/pages/components/platformRules/index',
      })
    },
    cancel () {
      wx.showToast({
        title: '请点击同意 才能继续使用小程序',
        icon: 'none'
      })
      this.triggerEvent('cancel')
    }
  }
})